/**
 * Copyright (C), 2015-2019, XXX有限公司
 * FileName: TestService
 * Author:   Administrator
 * Date:     2019/6/17 17:12
 * Description: TestService
 * History:
 * <author>          <time>          <version>          <desc>
 * 作者姓名           修改时间           版本号              描述
 */
package com.lumacong.websocket.service;

import com.lumacong.websocket.vo.DsIntegralToday;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.jdbc.core.BeanPropertyRowMapper;
import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class DsIntegralTodayService {

    @Autowired
    private JdbcTemplate jdbcTemplate;

    public List<DsIntegralToday> findAll() {
        String sql = "select a.* " +
                "from ds_integral_today a inner join ds_user b on a.ds_user_id =  b.id\n" +
                "where b.status =1";
        List<DsIntegralToday> query = jdbcTemplate.query(sql, new BeanPropertyRowMapper<>(DsIntegralToday.class));
        return query;
    }


}
